package com.xtwy.qrcodescan.exception;

import com.google.gson.Gson;
import com.xtwy.qrcodescan.bean.BaseResponseBean;

/*
 * -----------------------------------------------------------------
 * Copyright (C) 2014-2016, by your company, All rights reserved.
 * -----------------------------------------------------------------
 * 文    件: MyException.java
 * 作    者: 侯建军
 * 版    权: 1.0.0
 * 描    述: 自定义异常
 * 创建时间: 2018/9/14 17:31
 * 更新时间：2018/9/14 17:31
 * -----------------------------------------------------------------
 * 2018/9/14 17:31: 创建 MyException.java (侯建军);
 * -----------------------------------------------------------------
 */
public class MyException extends IllegalStateException {

    private BaseResponseBean errorBean;

    public MyException(String s) {
        super(s);
        errorBean = new Gson().fromJson(s, BaseResponseBean.class);
    }

    public BaseResponseBean getErrorBean() {
        return errorBean;
    }
}
